package nimbus.utils
{
	import flash.utils.getQualifiedClassName;
	
	public function detectAbstractInstantiation(thisReference:Object, classObject:Object):void
	{
		if(!(classObject is Class))
		{
			classObject = classObject.constructor;
		}
			
		if(thisReference.constructor == classObject)
		{
			throw new Error(getQualifiedClassName(classObject).split("::").pop() + " class " +  
					"cannot be instantiated.");
		}
	}
}